<!---- 模板 on 2017/3/30 -->
<script ng-init="initCss('device-repair-page/css/device-repair.css')"></script>
<div class="page">
    <header class="bar bar-nav">
        <a class="icon icon-left pull-left" href="javascript:history.go(-1);"></a>
        <h1 class="title">设备维修</h1>
    </header>
    <nav class="bar bar-tab">
        <div class="repair-out">
            <input class="repair-out-item" type="number" ng-model="expenditure" placeholder="总支出(￥)">
            <input class="repair-out-item" type="number" ng-model="recordConsumedTimeDuration" placeholder="维修用时(h)">
            <button class="sure repair-out-item" ng-click="submit()">完成</button>
        </div>
    </nav>
    <div class="content" ng-init="">
        <div class="content-block-title">
            维修零件清单[设备编号:'{{device.deviceNo}}']
            <span ng-if="partsList.length < 1" class="list-empty">(零件清单列表暂时为空)</span>
        </div>
        <div class="list-block">
            <ul>
                <li class="item-content" ng-repeat="parts in partsList track by parts.partsNo">
                    <div class="item-media">
                        <a class="red fa-icon fa fa-remove" href="javascript:;" ng-click="removeParts($index)"></a>
                    </div>
                    <div class="item-inner">
                        <div class="item-title">{{parts.partsName}}</div>
                        <div class="item-after">x{{parts.partsNumber}}</div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="content-block">
            <div class="inner-float-left new-parts hidden">
                <input class="part-name" ng-model="addingParts.partsName" type="text" placeholder="零件名">
                <input class="part-num" ng-model="addingParts.partsNumber" type="number" placeholder="" value="1">
                <a class="fa-icon fa fa-check over-add button" href="javascript:;" ng-click="addParts()"></a>
            </div>
            <p><a href="javascript:;" ng-click="showAddingElement()">+ (添加零件)</a></p>
        </div>
    </div>
</div>
<div ng-init="suiMobileInit()"></div>